﻿$(document).ready(function () {
    $("#music-list ul li.playerlist").mouseover(function () {
        $(this).find("tr.hiddenlist").show();
    })
    $("#music-list ul li.playerlist").mouseleave(function () {
        $(this).find("tr.hiddenlist").hide();
    })
    $("#music-list ul li.playerlist").dblclick(function () {
        $(this).parents("ul").find("li.playerlistactive").attr("class", "playerlist");
        $(this).attr("class", "playerlistactive");
    })
});
function playmedia(mediaid) {
    var img = $("img[id='" + mediaid + "']").attr("src");
    if (img == "/css/mp3play/images/play.png") {
        $("img[id='" + mediaid + "']").attr("src", "/css/mp3play/images/stop.png");
    }
    else {
        $(".playermini img").attr("src", "/css/mp3play/images/stop.png");
        $("img[id='" + mediaid + "']").attr("src", "/css/mp3play/images/play.png");
    }
    $("#player-plugin-hidden").find("iframe").attr("src", "../scripts/jmp3/singlemp3player.swf?file=" + mediaid + "&showDownload=false&showfilename=true&showdownload=true&songVolume=50&autoStart=true");
}
function playmediamini(mediaid) {
    var img = $("img[id='" + mediaid + "']").attr("src");
    if (img == "/css/mp3play/images/play.png") {
        $("img[id='" + mediaid + "']").attr("src", "/css/mp3play/images/stop.png");
        $("#player-plugin-hidden").find("iframe").attr("src", "../scripts/jmp3/singlemp3player.swf?showDownload=false");
    }
    else {
        $(".playermini img").attr("src", "/css/mp3play/images/stop.png");
        $("img[id='" + mediaid + "']").attr("src", "/css/mp3play/images/play.png");
        $("img[id='" + mediaid + "']").parents("ul").find("li.playerlistactive").attr("class", "playerlist");
        $("img[id='" + mediaid + "']").parents("li").attr("class", "playerlistactive");
        $("#player-plugin-hidden").find("iframe").attr("src", "../scripts/jmp3/singlemp3player.swf?file=" + mediaid + "&showDownload=false&showfilename=true&showdownload=true&songVolume=50&autoStart=true");
    }
}